From c90a755f261b8ccb3dac7e1f695122cac95c6053 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 23 Oct 2014 12:01:15 +0100 Subject: [PATCH] tools/libxl: Fix libxl_list_vcpu() following c/s 93e52d52 My reasoning regarding nr_cpus_out was wrong, as I had confused nr_cpus_out with nr_vcpus_out. Dario pointed this out, but the patch (having gained appropriate acks) got committed before I could post a correction. Noticed-by: Dario Faggioli Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu Reviewed-by: Dario Faggioli Acked-by: Ian Campbell --- tools/libxl/libxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index ee127d8ef0..18561fbe59 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -5252,6 +5252,7 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid, return NULL; } + *nr_cpus_out = libxl_get_max_cpus(ctx); ret = ptr = libxl__calloc(NOGC, domaininfo.max_vcpu_id + 1, sizeof(libxl_vcpuinfo)); -- 2.30.2